@extends('back.index')
@section('title','作家咨询管理-后台管理系统')
@section('mian')
    <div style="font-size:14px;padding:20px;" class="modal-content">
        <h2 class="sub-header power_mian">作者咨询管理</h2>
        <div class="table-responsive">
            <table class="table table-striped">
                <tr>
                    <th>笔名</th>
                    <th>头像</th>
                    <th>问题分类</th>
                    <th>问题描述</th>
                    <th>咨询时间</th>
                    <th>操作</th>
                </tr>
                @if(count($sum))
                    @foreach($sum as $k)
                        <tr>
                            <td>{{$k->nickname}}</td>
                            <td>
                                @if($k->icon)
                                    <img src="{{asset('image/writer/'.$k->icon)}}" alt="" style="height:100px;width:100px">
                                @else
                                    <img src="{{asset('image/public.jpg')}}" alt="" style="height:100px;width:100px">
                                @endif
                            </td>
                            <td>
                                @if($k->type == 1)
                                    新书审核问题咨询
                                @elseif($k->type == 2)
                                    作品日常管理咨询
                                @elseif($k->type == 3)
                                    作品违规屏蔽、删除问题咨询
                                @endif
                            </td>
                            <td>{{$k->text}}</td>
                            <td>{{date('Y-m-d H:i:s',$k->addtime)}}</td>
                            <td>
                                @if($k->can == 1)
                                    <a href="{{url('back/writer/userAnswer/'.$k->id)}}" class="btn btn-info">回复</a>
                                @else
                                    <p class="btn btn-info">已回复</p>
                                @endif
                                &nbsp
                                <a href="{{url('back/writer/userTalk/'.$k->id)}}" class="btn btn-info">删除</a></td>
                        </tr>
                    @endforeach
                @else
                    <tr>
                        <td colspan="6">
                            <h3 class="book_name" >暂无数据</h3>
                        </td>
                    </tr>
                @endif
            </table>
            {{$sum->links()}}
        </div>
    </div>
    @endsection